using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;

namespace GameShow.DAL
{
    public class DALBase
    {
        private SqlConnection _AppConnection = null;

        protected SqlConnection AppConnection
        {
            get
            {
                if (_AppConnection == null)
                {
                    _AppConnection = new SqlConnection(Database.ConnectionString);                   
                }
                if (_AppConnection.State == System.Data.ConnectionState.Closed)
                    _AppConnection.Open();
                return _AppConnection;
            }
            set
            {
                _AppConnection = value;
            }
        }        
    }
}
